home *** CD-ROM | disk | FTP | other *** search
- /*
- ### procedure for computing Fourier spectra ###
- */
- #include <stdio.h>
-
- void fft_go_proc()
- {
- void graph_proc(),fft_compute(),fft_write();
- extern FILE *fp_graph_tochild;
- extern int graph_logx,graph_logy;
- extern int tser_len,tser_data_option;
- extern char string2[],string[],source_dir[];
-
- all_reset();
-
- /* copy time series from orbits if necessary */
- if(tser_data_option==0)
- tser_copy();
-
- /* set the length of fourier input data */
- fft_set_len();
-
- graph_logx = 0;
- graph_logy = 1;
- /* set log flags */
- if(graph_logx ==1 && graph_logy ==1)
- sprintf(string,"-x l -y l");
- else if(graph_logx ==1)
- sprintf(string,"-x l");
- else if(graph_logy ==1)
- sprintf(string,"-y l");
- else
- sprintf(string,"");
-
- sprintf(string2,"%s/bin/sgraph -x 0 %d -m 1 %s",source_dir,tser_len,string);
- graph_proc(string2);
- fft_malloc();
- fft_compute(fp_graph_tochild);
- fft_write(fp_graph_tochild);
- fclose(fp_graph_tochild);
- }
-